﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Quartz;

namespace FileDeleteConsoleApp
{
    public class InitDataJob : IJob
    {
        public void Execute(IJobExecutionContext context)
        {
            try
            {
                var srcPath = System.Configuration.ConfigurationManager.AppSettings["FilePath"];
                var dateString = System.Configuration.ConfigurationManager.AppSettings["TimeType"];
                var dirName = DateTime.Now.ToString(dateString);
                var result = FileDeleteTools.FileDelete(srcPath, dirName);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
           
        }
    }
}
